//
//  BaseScrollView.m
//  JiuXiao
//
//  Created by wangbo on 16/8/31.
//  Copyright © 2016年 Ed. All rights reserved.
//

#import "BaseScrollView.h"

@implementation BaseScrollView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.showsHorizontalScrollIndicator = NO;
        self.showsVerticalScrollIndicator = NO;
    }
    return self;
}

// 处理UISlider手势与UIScrollView手势冲突的问题
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
    UIView *result = [super hitTest:point withEvent:event];
    if ([result isKindOfClass:NSClassFromString(@"ASValueTrackingSlider")])
    {
        self.scrollEnabled = NO;
    }
    else
    {
        self.scrollEnabled = YES;
    }
    return result;
}

@end
